/**
 * @param {number[]} digits
 * @return {number[]}
 */
 var findEvenNumbers = function(digits) {
  let ans = new Set
  const check = (str) => {
    let num = Number(str)
    return str[0] !== '0' && num % 2 === 0
  }
  const n = digits.length
  for(let i = 0; i<n; i++){
    for(let j = 0; j<n; j++){
      for(let k = 0; k<n; k++){
        if(i === j || i === k || j === k) continue
        let now = String(digits[i]) + String(digits[j]) + String(digits[k])
        if(check(now)){
          ans.add(Number(now))
        }
      }
    }
  }
  ans = [...ans]
  ans.sort((a,b) => a-b)
  return ans
};